# coding:utf-8
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

plt.rcParams["font.sans-serif"] = ["SimHei"]
plt.rcParams['axes.unicode_minus'] = False

data_source = pd.read_excel("d:/iris.xlsx")
fig = plt.figure()
ax = fig.add_subplot(111)
ax = sns.countplot(data=data_source, x="属种");
ax.xaxis.set_major_locator(plt.AutoLocator())
ax.set_title("属种")
ax.set_xlabel("属性值")
ax.set_ylabel("频数")
fig.savefig("d:/test.png")

